﻿using System;
using System.Collections.Generic;
using System.Text;
using AutoMapper;
using BCEntity.Common.Area;
using BCDto.Common.Area;

namespace BCService.Common.Area
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            CreateMap<ProvinceEntity, ProvinceDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceEntity, ProvinceViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceDto, ProvinceEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceRequestDto, ProvinceEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
           
            CreateMap<CityEntity, CityDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityEntity, CityViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityDto, CityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityRequestDto, CityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            
            CreateMap<CountyEntity, CountyDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyEntity, CountyViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyDto, CountyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyRequestDto, CountyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<ProvinceCityDto, ProvinceCityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceCityEntity, ProvinceCityDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceEntity, ProvinceCityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

        }
    }
}
